<?php
/**
* @package Joomla! Tools Suite - Forum Post Generation Utility
* @author RussW
* @translation: German [de-DE]: Jan Erik Zassenhaus <info@jgerman.de>
* @translation version: 1.0
* @copyright RussW, All rights reserved. 2008
*/


	// error_reporting( E_ALL & ~E_NOTICE);
	error_reporting( E_ALL);
	
	// Set flag that this is a Joomla! parent file
	define( '_VALID_MOS', 1 );
	define( '_JEXEC', 1 );

	if ( @$_POST['genP'] != "1" ) { @$_POST['genP'] = "0"; }
	if ( @$_POST['extP'] != "1" ) { @$_POST['extP'] = "0"; }

	// INITIAL CHECKS AND SETUP
	// Find the Joomla! configuration file(s)
	if (file_exists( './configuration.php' )) {

		// Is J! installed yet?
		if(defined( '_VALID_MOS' )) {
 	  		@require_once("./configuration.php");
			} else {
   				@include_once("./configuration.php");
				} 

		if(defined( '_JEXEC' )) {
 	  		@require_once("./configuration.php");
			} else {
   				@include_once("./configuration.php");
				} 

		// If we find a configuration.php, Joomla! shuld be installed.
		$installedJ		=	"1";

		} else if (!file_exists( './configuration.php' )) {
			// or are doing Pre-Installation checks?
			$installedJ		=	"0";

			}

	// BEGIN JOOMLA VERSION CHECKING
	// Check for J! v1.0 version file
	if (file_exists( './includes/version.php' )) {
		@require_once( './includes/version.php' );



        $link = @mysql_connect('localhost', $mosConfig_user, $mosConfig_password);
		$sqlErr = mysql_errno();

		if ((!$link) && (function_exists( 'mysqli_connect' ))) {
			$link = @mysqli_connect('localhost', $mosConfig_user, $mosConfig_password);
			$sqlErr = mysqli_connect_errno();
			}

		// It's Joomla! 1.0
		$isJVER         = "10";

		$_VERSION 		= new joomlaVersion();
//		$versioninfo 	= $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS;
		$version 		= $_VERSION->PRODUCT .' '. $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS.' [ '.$_VERSION->CODENAME .' ] '. $_VERSION->RELDATE .' '. $_VERSION->RELTIME .' '. $_VERSION->RELTZ;

//		$thisVersion    = $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL;
//		$thisDevLevel   = $_VERSION->DEV_LEVEL;


		// Check for J! v1.5 version file
		} else if (file_exists( './libraries/joomla/version.php' )) {  
			@require_once( './libraries/joomla/version.php' );


			define('JPATH_BASE', dirname(__FILE__) );
			define( 'DS', DIRECTORY_SEPARATOR );

			require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
			require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

			// Not sure this is required, MySQL "get" commands work fine for me, but not for some without it....
			$mainframe =& JFactory::getApplication('site');

			// It's Joomla! 1.5		
			$isJVER         	= "15";

			$_VERSION 		= new JVersion();
//			$versioninfo 	= $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS;
			$version 		= $_VERSION->PRODUCT .' '. $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS.' [ '.$_VERSION->CODENAME .' ] '. $_VERSION->RELDATE .' '. $_VERSION->RELTIME .' '. $_VERSION->RELTZ;

//			$thisVersion    = $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL;
//			$thisDevLevel   = $_VERSION->DEV_LEVEL;


			$_JCONFIG		= new JConfig();
			$jts_ftp		= $_JCONFIG->ftp_enable;
			$jts_sef		= $_JCONFIG->sef;
			$jts_sef_rewrite= $_JCONFIG->sef_rewrite;


			// Otherwise, assume J! is not installed and the user is doing Pre-Installation check, or a bad/incomplete FTP upload has occured
			} else if ((@$isJVER != "10") && (@$isJVER != "15")) {

				// Set isJVER to Pre-Install (PI) to force Pre-Install Check otpions only
				$isJVER			= "unknownVer";

				}

	// END JTS CONFIGURATION AND SETUP



	// MESSAGE SECTION (FOR TRANSALTION)
	define( '_JTSP_TITLE', 'JTS-post : Joomla!-Forum Beitragsassistent' );
	define( '_JTSP_VERSION', '1.0.1' );
	define( '_JTSP_RELEASE', 'F' );
	define( '_JTSP_JTS', 'Joomla! Tools Suite' );

	define( '_EXTENDED_TITLE', 'Erweiterten diagnostischen Beitrag generieren' );
	define( '_STANDARD_TITLE', 'Standardm&auml;&szlig;igen diagnostischen Beitrag generieren' );
	define( '_ENV_DISCOVERY', 'Entwicklungsumgebung' );
	define( '_JOOMLA', 'Joomla!' );
	define( '_HOST', 'Host' );
	define( '_WEB', 'Web' );
	define( '_PHP', 'PHP' );
	define( '_MYSQL', 'MySQL' );
	define( '_ENVIRONMENT', 'Umgebung' );

	define( '_CFG_FILE', 'configuration.php' );
	define( '_ARCHITECTURE', 'Architektur' );
	define( '_PLATFORM', 'Platform' );
	define( '_VERSION', 'Version' );
	define( '_WRITABLE', 'beschreibbar' );
	define( '_NOT_WRITABLE', 'nicht beschreibbar' );
	define( '_MODE', 'Modus' );
	define( '_RG_EMULATION', 'RG_EMULATION' );
	define( '_ENABLED', 'Aktiviert' );
	define( '_DISABLED', 'Deaktiviert' );
	define( '_NA', 'N/A' );
	define( '_SERVER', 'Server' );
	define( '_SUPPORT', 'Support' );
	define( '_REQ', 'Voraussetzungen' );
	define( '_NO', 'Nein' );
	define( '_YES', 'Ja' );
	define( '_SECONDS', 'Sekunden' );
	define( '_INFO', 'Info' );
	define( '_WO_REWRITE', 'ohne ReWrite' );
	define( '_W_REWRITE', 'mit ReWrite' );
	define( '_NOT_IMPLEMENTED', 'Nicht implementiert' );
	define( '_IMPLEMENTED', 'Implementiert' );
	define( '_CURRENT_PATH', 'Aktueller Pfad' );
	define( '_DOC_ROOT', 'Hauptverzeichnis' );
	define( '_ACCOUNT', 'Acc.' );
	define( '_USER', 'Benutzer' );
	define( '_ACC_MATCH', 'Benutzer- und Webserver-Konten sind identisch. (PHP/suExec wahrscheinlich installiert)' );
	define( '_ACC_MATCH_NO', 'Benutzer- und Webserver-Konten sind nicht identisch. (PHP/suExec wahrscheinlich nicht installiert)' );
	define( '_FUNCTIONS', 'Funktionen' );
	define( '_CLIENT', 'Client' );
	define( '_CHARSET', 'Zeichensatz' );
	define( '_INSTRUCTIONS', 'Anleitung' );
	define( '_INS_1', 'W&auml;hlen Sie den Level der Detailgenauigkeit (Standard oder Erweitert), um Ihren Beitrag zu generieren.' );
	define( '_INS_2', 'Vervollst&auml;ndigen Sie Ihre Problembeschreibung (optional)' );
	define( '_INS_3', 'F&uuml;gen Sie eine <i>einzelne Zeile</i> Fehlermeldung hinzu (optional)' );
	define( '_INS_4', 'Erkl&auml;ren Sie genau, welche Schritte Sie unternommen haben, um das Problem zu l&ouml;sen (optional)' );
	define( '_INS_5', 'Klicken Sie auf "<b>Beitrag generieren</b>".' );
	define( '_POST_GENERATION', 'Beitragsgenerierung' );
	define( '_POST_NOTE', 'Lassen Sie ALLE Felder frei/leer, um nur diagnostische Informationen zu generieren.' );
	define( '_PROB_DESC', 'Problembeschreibung' );
	define( '_LOG_MSG', 'Protokoll/Fehlermeldung' );
	define( '_ACTION', 'Unternommene Schritte zur Probleml&ouml;sung' );
	define( '_GENERATE_POST', 'BEITRAG GENERIEREN' );
	define( '_POST_INFO', 'Kopieren Sie den Text unten und f&uuml;gen Sie ihn dann in einen neuen Beitrag im Forum ein.' );

	define( '_DIAG_INFO', 'Diagnostische Informationen' );
	define( '_EXT_INFO', 'Erweiterte Informationen' );
	define( '_COMPONENT', 'eine Komponente von' );

	define( '_BAD_VERSION', 'Die Joomla!-Version konnte nicht erkannt werden oder die dazugeh&ouml;rige "Versionsdatei" konnte nicht gefunden werden!' );
	define( '_NOT_INSTALLED', 'Eine Joomla!-Installation konnte nicht gefunden werden. Entweder ist Joomla! nicht installiert oder die dazugeh&ouml;rige "configuration.php"-Datei konnte nicht gefunden/gelesen werden!' );



	// BEGIN BASIC PAGE
	echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";
	?>


	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<style type="text/css">

	</style>

	<style>
	TABLE { font-family: arial, helvetica, verdana; font-size: 8pt; }
	.Heading { font-weight: bold; }

	td.deinfo_secgroup {
		font-family: tahoma, arial, verdana, helvetica;
		font-size: 12px;
		font-weight: bold;
		color: #0C4866;
		text-align: left;
		height: auto;
		padding-bottom: 2px;
		padding-left: 5px;
		background: #D6EAF5;
		border: solid #C8CDD0 1px;
	}

	td.deinfo_sectitle {
		font-family: tahoma, arial, verdana, helvetica;
		font-size: 11px;
		font-weight: normal;
		color: #FFFFFF;
		text-align: left;
		vertical-align: top;
		height: auto;
		padding-top: 2px;
		padding-right: 5px;
		padding-bottom: 2px;
		padding-left: 5px;
		background: #0C4866;
		border: solid #0C4866 1px;
		margin-top: 5px;
		margin-bottom: 5px;	
	}

	td.deinfo_sechead {
		font-family: tahoma, arial, verdana, helvetica;
		font-size: 7pt;
		color: #000000;
		text-align: left;
		font-weight: bold;
		vertical-align: top;
		height: auto;
		padding-top: 0px;
		padding-right: 0px;
		padding-bottom: 2px;
		padding-left: 5px;
		background: #D6EAF5;
		border: solid #C8CDD0 1px;
		margin-top: 5px;
		margin-bottom: 5px;	
	}

	td.deinfo_content,div.deinfo_content {
		font-family: tahoma, arial, verdana, helvetica;
		font-size: 7pt;
		color: #404040;
		text-align: left;
		vertical-align: top;
		height: auto;
		padding-top: 0px;
		padding-right: 0px;
		padding-bottom: 2px;
		padding-left: 10px;
		background: #FFFFFF;
		border-bottom: solid #C8CDD0 1px;
		margin-top: 5px;
		margin-bottom: 5px;	
	}


	input, textarea { 
		font-family: arial, helvetica, verdana; 
		font-size: 8pt; 
		color: #404040; 
		border: solid #0C4866 1px; 
		background: #DEF5C8; 
	}
	</style>


	<title><?php echo _JTSP_TITLE ." : v". _JTSP_VERSION ." (". _JTSP_RELEASE .")"; ?></title>

		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

		<?php
		if ( $isJVER == "10" ) {
			echo '<link rel="shortcut icon" href="./images/favicon.ico" />';
			} else {
				echo '<link rel="shortcut icon" href="./templates/rhuk_milkyway/favicon.ico" />';
				}
		?>

	</head>

<body>


	<?php
		// J! Version has been recognised
		if ( ( @$isJVER != "unknownVer" ) && ( @$installedJ != "0" ) ) { 		
		?>
	



	<table border="0" cellspacing="8" cellpadding="0" align="center" width="755">
	<tr>
		<td class="deinfo_sectitle" style="font-size: 13pt; color: #404040; background-color: #F5F5F5;" colspan="4"><?php echo _JTSP_TITLE ." <span style='font-size: 8pt;'>: v"._JTSP_VERSION ." (". _JTSP_RELEASE .")</span>" ?></td>
	</tr>
	
	<tr>
		<td valign="top" width="50%">
		<!--// START BASIC DISCOVERY //-->

		<!--// START COLUMN ONE //-->
	<form method="post" name="jtsPOST">
	
	<table border="0" cellpadding="0" cellspacing="2" align="center" width="100%">

		<tr>
			<td class='deinfo_content' style="font-weight: bold;" colspan="2"><input type="radio" name="extP" value="0" CHECKED> <?php echo _STANDARD_TITLE; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3" height="10px"></td></tr>

		<tr>
			<td class='deinfo_sectitle' colspan="2"><?php echo _JOOMLA ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td class="deinfo_sechead" width="30%" valign="middle"><strong><?php echo _JOOMLA ." ". _VERSION; ?></strong></td>
			<td class="deinfo_content" width="70%" valign="middle"><strong><?php echo $version; ?></strong></td>
		</tr>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong><?php echo _CFG_FILE; ?></strong></td>
			<td class="deinfo_content" valign="middle">
			<?php
				if (is_writable('./configuration.php')) { 
					echo "<font color='red'>". _WRITABLE ."</font>"; $cfgWrite = "[color=red]". _WRITABLE ."[/color]"; $cfgPerm = substr(sprintf('%o', @fileperms('./configuration.php')),-3, 3); 
					} else { 
						echo "". _NOT_WRITABLE .""; $cfgWrite = "". _NOT_WRITABLE .""; 
						$cfgPerm = substr(sprintf('%o', @fileperms('./configuration.php')),-3, 3);
						}

				echo " ( ". _MODE .": ". substr(sprintf('%o', @fileperms('./configuration.php')),-3, 3) ." ) ";
			?>
			</td>
		</tr>


		<?php if ($isJVER == "10") { ?>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong><?php echo _RG_EMULATION; ?></strong></td>
			<td class="deinfo_content" valign="middle">
			<?php
				if ( RG_EMULATION == "1" ) { 
					echo "<font color='red'>". _ENABLED ."</font>"; $rgEmulation = "[color=red]". _ENABLED ."[/color]"; 
					} else { 
						echo "". _DISABLED .""; $rgEmulation = "". _DISABLED .""; 
						}		
			?>
			</td>
		</tr>

		<?php } else { ?> 

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong><?php echo _RG_EMULATION; ?></strong></td>
			<td class="deinfo_content" valign="middle">N/A <?php $rgEmulation = "". _NA .""; ?></td>
		</tr>		

		<?php } ?>


		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _HOST ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong><?php echo _ARCHITECTURE; ?></strong></td>
			<td class="deinfo_content" valign="middle"><?php echo @php_uname(m) ." ( ". (substr(PHP_OS, 0, 10)) ." )"; ?></td>
		</tr>

		<tr>
			<td class="deinfo_sechead" valign="top"><strong><?php echo _PLATFORM; ?></strong></td>
			<td class="deinfo_content" valign="top"><?php echo @php_uname(s); ?> <?php echo @php_uname(r); ?><br /> <?php echo @php_uname(v); ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _WEB ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

        <tr>
			<td class="deinfo_sechead" width="35%"><b><?php echo _WEB ." ". _SERVER ." ". _VERSION; ?></b></td>
			<td class="deinfo_content" width="65%"><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
		</tr>
        
        <tr>
			<td class="deinfo_sechead"><?php echo _WEB ." ". _HOST; ?></td>
			<td class="deinfo_content"><?php echo $_SERVER['HTTP_HOST']; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>
		
		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _PHP ." ". _ENV_DISCOVERY; ?></td>
		</tr>
		
		<tr><td class="spacer" colspan="3"></td></tr>
        
        <tr>
			<td class="deinfo_sechead" width="35%"><b><?php echo _PHP ." ". _VERSION; ?></b></td>
			<td class="deinfo_content" width="65%"><?php echo phpversion(); ?></td>
		</tr>
        
        <tr>
			<td class="deinfo_sechead">register_globals</td>
			<td class="deinfo_content">
			<?php 
				if (ini_get('register_globals')) { 
					echo "<font color='red'>". _ENABLED ."</font>"; 
					} else { 
						echo "". _DISABLED .""; 
						} 
			?>
			</td>
		</tr>

        <tr>
			<td class="deinfo_sechead">magic_quotes_gpc</td>
			<td class="deinfo_content">
			<?php 
				if (!ini_get('magic_quotes_gpc')) { 
					echo "<font color='red'>". _DISABLED ."</font>"; 
					} else { 
					echo "". _ENABLED .""; 
						} 
			?>
			</td>
		</tr>
						
        <tr>
			<td class="deinfo_sechead">safe_mode</td>
			<td class="deinfo_content">
			<?php 
				if (ini_get('safe_mode')) { 
					echo "<font color='red'>". _ENABLED ."</font>"; 
					} else { 
						echo "". _DISABLED .""; 
						} 
			?>
			</td>
		</tr>

		<tr>
			<td class="deinfo_sechead"><?php echo _MYSQL; ?></td>
			<td class="deinfo_content">
				<?php echo extension_loaded('mysql')?''. _YES.'':'<span style="color: red;">'. _NO .'</font>'; ?>
			</td>
		</tr>

        <tr>
			<td class="deinfo_sechead">xml</td>
			<td class="deinfo_content">
				<?php echo extension_loaded('xml')?''. _YES .'':'<span style="color: red;">'. _NO .'</font>'; ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">zlib</td>
			<td class="deinfo_content">
				<?php echo extension_loaded('zlib')?''. _YES .'':'<span style="color: red;">'. _NO .'</font>'; ?>
			</td>
		</tr>
	
		<tr>
			<td class="deinfo_sechead">mbstring</td>
			<td class="deinfo_content">
				<?php echo extension_loaded('mbstring')?''. _YES .'':'<span style="color: red;">'. _NO .'</font>'; ?>
			</td>
		</tr>

		<tr>
			<td class="deinfo_sechead">iconv</td>
			<td class="deinfo_content">
				<?php echo function_exists('iconv')?''. _YES .'':'<span style="color: red;">'. _NO .'</font>'; ?>
			</td>
		</tr>

        <tr>
			<td valign="top" class="deinfo_sechead">save.session_path</td>
			<td class="deinfo_content">
			<?php 
				echo ini_get('session.save_path') ."<br />";
					if (!is_writable(ini_get('session.save_path'))) { 
						echo "<font color='red'>". _NOT_WRITABLE ."</font>"; 
						} else { 
							echo "". _WRITABLE .""; 
							} 
			?>
			</td>
		</tr>

        <tr>
			<td class="deinfo_sechead">Max. Execution Time</td>
			<td class="deinfo_content"><?php echo ini_get('max_execution_time'); ?> <?php echo _SECONDS; ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">File Upload</td>
			<td class="deinfo_content">
			<?php if (ini_get('file_uploads') == "1") { 
				echo "Enabled"; 
				} else { 
					echo "Disabled"; 
					} 
			?>
			</td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>
		
		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _MYSQL ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>
        
        <tr>
			<td class="deinfo_sechead" width="35%"><b><?php echo _MYSQL ." ". _SERVER ." ". _VERSION; ?></b></td>
			<td class="deinfo_content" width="65%"><?php echo @mysql_get_server_info(); ?></td>
		</tr>

		<tr>
			<td class="deinfo_sechead"><?php echo _HOST ." ". _INFO; ?></td>
			<td class="deinfo_content"><?php echo @mysql_get_host_info(); ?></td>
		</tr>
		</table>
		<!--// END BASIC DISCOVERY //-->


		</td>		
		<td valign="top" width="50%">

		<!--// START EXTENDED DISCOVERY //-->

		<table border="0" cellpadding="0" cellspacing="2" align="center" width="100%">
		<tr>
			<td class='deinfo_content' style="font-weight: bold;" colspan="2">
				<input type="radio" name="extP" value="1"><?php echo _EXTENDED_TITLE; ?>
			</td>
		</tr>

		<tr><td class="spacer" colspan="3" height="10px"></td></tr>

		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _JOOMLA ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong>SEF</strong></td>
			<td class="deinfo_content" valign="middle">
			<?php
				if ($isJVER == "15") {
					if ($jts_sef == "0") { 
						echo "". _DISABLED.""; $sefstate = "". _DISABLED.""; 
						} else { 
							echo "". _ENABLED."";  $sefstate = "". _ENABLED."";
							}
					
					if ($jts_sef_rewrite == "0") { 
						echo " (". _WO_REWRITE .")"; $rewritestate = " (". _WO_REWRITE .") "; 
						} else { 
							echo " (". _W_REWRITE .")"; $rewritestate = " (". _W_REWRITE .") "; 
							}
					
				} else {

					if (@$mosConfig_sef == "0") { 
						echo "". _DISABLED .""; $sefstate = "". _DISABLED .""; $rewritestate = ''; 
						} else { 
							echo "". _ENABLED .""; $sefstate = "". _ENABLED .""; $rewritestate = ''; 
							}
				
				}
			?>			
			</td>
		</tr>


		<?php if ($isJVER == "15") { ?>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong>FTP Layer</strong></td>
			<td class="deinfo_content" valign="middle">
			<?php
				if ($jts_ftp == "1") { 
					echo "". _ENABLED .""; $ftpLayer = "". _ENABLED .""; 
					} else { 
						echo "". _DISABLED .""; $ftpLayer = "". _DISABLED .""; 
						}
			?>
			</td>
		</tr>

		<?php } else { ?>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong>FTP Layer</strong></td>
			<td class="deinfo_content" valign="middle">
			<?php echo _NA; $ftpLayer = "". _NA .""; ?>
			</td>
		</tr>

		<?php } ?>

		<tr>
			<td class="deinfo_sechead" valign="middle"><strong>htaccess</strong></td>
			<td class="deinfo_content" valign="middle">
			<?php
				if (!file_exists('.htaccess')) { 
					echo "". _NOT_IMPLEMENTED .""; $htaccess = "". _NOT_IMPLEMENTED .""; 
					} else { 
						echo "". _IMPLEMENTED .""; $htaccess = "". _IMPLEMENTED .""; 
						}		
			?>			
			</td>
		</tr>

		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866 url(assets/images/mysql.png) 2px center no-repeat;" colspan="2"><?php echo _WEB ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td width="30%" class="deinfo_sechead"><?php echo _CURRENT_PATH; ?></td>
			<td width="70%" class="deinfo_content"><?php echo getcwd (); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead"><?php echo _DOC_ROOT; ?></td>
			<td class="deinfo_content"><?php echo $_SERVER['DOCUMENT_ROOT']; ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead"><?php echo _SERVER ." ". _ACCOUNT; ?><br /><?php echo _USER ." ". _ACCOUNT; ?></td>
			<td class="deinfo_content">
			<?php
				if (function_exists( 'exec' )) {
        			$ApacheAcc = exec("whoami");
					} else if (function_exists( 'passthru' )) {         				 		
						$ApacheAcc = passthru("whoami");
						}

				$UserAcc = get_current_user ();
							
				echo $ApacheAcc ."<br />". $UserAcc;
				
				if ($UserAcc == $ApacheAcc) { 
					$accountMatch = "". _ACC_MATCH .""; 
					} else { 
						$accountMatch = "". _ACC_MATCH_NO .""; 
						}
			?>							
			</td>
		</tr>

		<tr><td class="spacer" colspan="3"></td></tr>
		
		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _PHP ." ". _ENV_DISCOVERY; ?></td>
		</tr>

		<tr>
			<td class="deinfo_sechead"><?php echo _PHP; ?> API</td>
			<td class="deinfo_content"><?php echo php_sapi_name(); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">mysqli</td>
			<td class="deinfo_content"><?php echo extension_loaded('mysqli')?''. _YES .'':'<span style="color: red;">'. _NO .'</font>'; ?></td>
		</tr>

		<tr>
			<td class="deinfo_sechead">Max. Memory Limit</td>
			<td class="deinfo_content"><?php echo ini_get('memory_limit'); ?></td>
		</tr>

		<tr>
			<td class="deinfo_sechead">Max. Upload File Size</td>
			<td class="deinfo_content"><?php echo ini_get('upload_max_filesize'); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">Max. Post Size</td>
			<td class="deinfo_content"><?php echo ini_get('post_max_size'); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">Max. Input Time</td>
			<td class="deinfo_content"><?php echo ini_get('max_input_time'); _SECONDS; ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead">Zend <?php echo _VERSION; ?></td>
			<td class="deinfo_content"><?php echo zend_version(); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead"><?php echo _DISABLED ." ". _FUNCTIONS; ?></td>
			<td class="deinfo_content">
			<?php
            	if (ini_get('disable_functions')) { 
            		echo (ini_get('disable_functions')); 
            		} else if (!ini_get('disable_functions')) { 
            			echo "<i>". _NO ." ". _DISABLED ." ". _FUNCTIONS ."</i>"; 
            			}
			?>
			</td>
		</tr>
		
		<tr><td class="spacer" colspan="3"></td></tr>
		
		<tr>
			<td class='deinfo_sectitle' style="background: #0C4866;" colspan="2"><?php echo _MYSQL ." ". _ENV_DISCOVERY; ?></td>
		</tr>
		
		<tr><td class="spacer" colspan="3"></td></tr>
        
        <tr>
			<td class="deinfo_sechead"><?php echo _CLIENT ." ". _VERSION; ?></td>
			<td class="deinfo_content"><?php echo @mysql_get_client_info(); ?></td>
		</tr>

        <tr>
			<td class="deinfo_sechead"><?php echo _CHARSET; ?></td>
			<td class="deinfo_content">
			<?php
				if (@function_exists('mysql_client_encoding')) { 
					$charset = mysql_client_encoding();
					echo $charset;
					}
			?>
			</td>
		</tr>
		</table>		
		<!--// END EXTENDED DISCOVERY //-->	


		<br /><br />


		<!--// START INSTRUCTIONS //-->

			<table border="0" cellspacing="0" cellpadding="0" align="center" width="90%" >
			<tr>
				<td class='deinfo_sectitle' style="background: #DEF5C8; color: #000000; font-weight: bold; font-size: 12px;"><?php echo _INSTRUCTIONS; ?></td>
			</tr>

			<tr>
				<td class="deinfo_content" style="background-color: #F5F5F5;">
				<br />
					<b>1.</b> <?php echo _INS_1; ?><br />
					<b>2.</b> <?php echo _INS_2; ?><br />
					<b>3.</b> <?php echo _INS_3; ?><br />
					<b>4.</b> <?php echo _INS_4; ?><br />
					<b>5.</b> <?php echo _INS_5; ?><br />
				</td>
			</tr>
			</table>		
		<!--// END INSTRUCTIONS //-->


		</td>
	</tr>

	<tr>
		<td colspan="2" height="35">&nbsp;</td>
	</tr>

	<tr>
		<td valign="top" style="background-color: #F5F5F5; border: 1px solid #C8CDD0;">

		<!--// START POST SUBMISSION FORM //-->		
			<table border="0" cellspacing="5" cellpadding="0" align="center" width="100%" style="background-color: #F5F5F5;">
			<tr>
				<td class='deinfo_sectitle' style="background: #DEF5C8; color: #000000; font-weight: bold; font-size: 12px;"><?php echo _POST_GENERATION; ?></td>
			</tr>

			<tr>
				<td valign="top">
					<i><?php echo _POST_NOTE; ?></i><br /><br />
					<?php echo _PROB_DESC; ?>:<br /><textarea cols="68" name="probDesc" rows="5"></textarea>
				</td>
			</tr>

			<tr>
				<td><?php echo _LOG_MSG;?> (1):<br /><input type="text" name="logOne" size="71"></td>
			</tr>

			<tr>
				<td><?php echo _LOG_MSG;?> (2):<br /><input type="text" name="logTwo" size="71"></td>
			</tr>

			<tr>
				<td><?php echo _LOG_MSG;?> (3):<br /><input type="text" name="logThree" size="71"></td>
			</tr>

			<tr>
				<td><?php echo _ACTION;?>:<br /><textarea cols="68" name="actionsTaken" rows="5"></textarea></td>
			</tr>

			<tr>
				<td align="center">
					<input type="hidden" name="genP" value="1">
					<input type="submit" style="background-color: #FF9900; font-size: 12px; width: 250px; color: #404040;" name="submit" value=" - <?php echo _GENERATE_POST; ?> - ">
				</td>
			</tr>
			</table>
		<!--// END SUBMISSOIN FORM //-->

		</td>
		<td valign="top" style="background-color: #F5F5F5; border: 1px solid #C8CDD0;">

		<!--// START POST OUTPUT //-->
		<table border="0" cellspacing="5" cellpadding="0" align="center" width="100%" style="background-color: #F5F5F5;">

		<?php if($_POST['genP'] == '1') { ?>
		<tr>
			<td class='deinfo_sectitle' style="background: #DEF5C8; color: #000000; font-weight: bold; font-size: 12px;">Post Content</td>
		</tr>					

		<tr><td class="spacer" colspan="3"></td></tr>

		<tr>
			<td valign="top">
				<i><?php echo _POST_INFO; ?></i>
				<br /><br />

				<textarea style="background-color: #DEF5C8;" cols="68" rows="21">[size=90]<?php if ($_POST['probDesc'] !='') { echo "[b][u]". _PROB_DESC .":[/u][/b]\n". $_POST['probDesc'] ."\n\n"; } if ($_POST['logOne'] !='') { echo "[b][u]". _LOG_MSG .":[/u][/b]\n[quote]". $_POST['logOne'] ."[/quote]\n"; } if ($_POST['logTwo'] !='') { echo "[quote]". $_POST['logTwo'] ."[/quote]\n"; } if ($_POST['logThree'] !='') { echo "[quote]". $_POST['logThree'] ."[/quote]\n\n"; } if ($_POST['actionsTaken'] !='') { echo "[b][u]". _ACTION .":[/u][/b]\n";  echo $_POST['actionsTaken']; } echo "\n\n"; ?>[/size][size=85]<?php echo "[b][u]". _DIAG_INFO ."[/u][/b]\n[b]". _JOOMLA ." ". _VERSION .":[/b] [color=blue]". $version ."[/color]\n"; echo "[b]". _CFG_FILE .":[/b] ". $cfgWrite ." (". _MODE .": ". $cfgPerm ." ) | "; echo "[b]". _RG_EMULATION .":[/b] ". $rgEmulation ."\n"; echo "[b]". _ARCHITECTURE ."/". _PLATFORM .": [/b]". @php_uname(s) ." ". @php_uname(r) ." ( ". @php_uname(m) .") | "; echo "[b]". _WEB ." ". _SERVER .":[/b] ". $_SERVER['SERVER_SOFTWARE'] ." ( ". $_SERVER['HTTP_HOST'] ." ) | "; echo "[b]". _PHP ." ". _VERSION .":[/b] ". phpversion() ."\n"; echo "[b]". _PHP ." ". _REQ .":[/b] register_globals: "; if (ini_get('register_globals')) { echo "[color=red]". _ENABLED ."[/color] | "; } else { echo _DISABLED ." | "; } echo "magic_quotes_gpc: "; if (!ini_get('magic_quotes_gpc')) { echo "[color=red]". _DISABLED ."[/color] | "; } else { echo _ENABLED ." | "; } echo "safe_mode: "; if (ini_get('safe_mode')) { echo "[color=red]". _ENABLED ."[/color] | "; } else { echo _DISABLED ." | "; } echo _MYSQL ." ". _SUPPORT .": "; echo extension_loaded('mysql')?''. _YES .' | ':'[color=red]'. _NO .'[/color] | '; echo "XML ". _SUPPORT .": "; echo extension_loaded('xml')?''._YES .' | ':'[color=red]'. _NO .'[/color] | '; echo "zlib ". _SUPPORT .": "; echo extension_loaded('zlib')?''. _YES .'':'[color=red]'. _NO .'[/color]'; echo "\nmbstring ". _SUPPORT ." (1.5): "; echo extension_loaded('mbstring')?''. _YES .' | ':'[color=red]'. _NO .'[/color] | '; echo "iconv ". _SUPPORT ." (1.5): "; echo function_exists('iconv')?''. _YES .' | ':'[color=red]'. _NO .'[/color] | '; if (!is_writable(ini_get('session.save_path'))) { echo "save.session_path: [color=red]". _NOT_WRITABLE ."[color] | "; } else { echo "save.session_path: ". _WRITABLE ." | "; } echo "Max.Execution Time: ". ini_get('max_execution_time'); echo " ". _SECONDS ." | "; echo "File Uploads:  "; if (ini_get('file_uploads') == "1") { echo _ENABLED ."\n"; } else { echo _DISABLED ."\n"; } echo "[b]". _MYSQL ." ". _VERSION .":[/b] "; echo @mysql_get_server_info(); echo " ( ". @mysql_get_host_info() ." )"; ?>
<?php if ( $_POST['extP'] == '1' ) { echo "\n\n[b][u]". _EXT_INFO .":[/u][/b]\n"; echo "[b]SEF: [/b]". $sefstate ."". $rewritestate ." | "; echo "[b]FTP Layer:[/b] ". $ftpLayer ." | "; echo "[b]htaccess:[/b] ". $htaccess ."\n"; echo "[b]PHP/suExec: [/b]". $accountMatch ."\n"; echo "[b]". _PHP ." ". _ENVIRONMENT .": [/b] API: ". php_sapi_name() ." | "; echo "". _MYSQL ."i: "; echo extension_loaded('mysqli')?''. _YES .' | ':''. _NO .' | '; echo "Max. Memory: ". ini_get('memory_limit') ." | "; echo "Max. Upload Size: ". ini_get('upload_max_filesize') ." | "; echo "Max. Post Size: ". ini_get('post_max_size') ." | "; echo "Max. Input Time: ". ini_get('max_input_time') ." | "; echo "Zend ". _VERSION .": ". zend_version() ."\n"; echo _DISABLED ." ". _FUNCTIONS .": ". ini_get('disable_functions') ."\n"; echo "[b]". _MYSQL ." ". _CLIENT .": [/b]". @mysql_get_client_info() ." ( ". $charset ." )"; }  ?>[/size]
				</textarea>
			</td>
		</tr>
		<?php } ?>
		</table>
		<!--// END POST OUTPUT //-->

		</td>
	</tr>
	</table>
	
	</form>


	<?php
	// J! Version was not recognised
		} else  if ( $isJVER == "unknownVer" ) {
		
			echo "<div style='background-color: yellow; text-align: center;'>". _BAD_VERSION ."</div>";
	
			} else if ( $installedJ == "0" ) {
			
				echo "<div style='background-color: yellow; text-align: center;'>". _NOT_INSTALLED ."</div>";
				
				}
	?>


	<br />
	<div style="color: #808080; font-size: 9px;" align="center"><?php echo _JTSP_TITLE; ?>, <?php echo _COMPONENT; ?> <a href="http://joomlacode.org/gf/project/jts/" target="_JTS"><?php echo _JTSP_JTS; ?></a></div>
</body>
</html>


